<template>
	<div>
		<topic :tableData="tableData" @del="del" />
	</div>
</template>

<script>
import { GttowntalkList, DetowntalkList } from '@/api/towntalk';
export default {
	name: '',
	data() {
		return {
			tableData: [],
			type: 0,
		};
	},
	props: {},
	components: {},
	created() {
		this.shtalk();
	},
	activated() {
		this.shtalk();
	},
	mounted() {},
	methods: {
		async shtalk() {
			console.log(111);
			this.tableData= await GttowntalkList({ state: false });
			console.log(this.tableData);
		},
		async del(id) {
			try {
				await DetowntalkList(id);
				this.$message.success('删除成功');
			} catch (err) {
				console.log(err);
			}
			this.shtalk();
		},
	},
	computed: {},
	watch: {},
};
</script>

<style scoped>
</style>




